package com.lifeservice.file.service;

import com.lifeservice.common.core.domain.UploadFile;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * 文件上传接口
 *
 * @author hoperun
 */
public interface ISysFileService {

    /**
     * 文件上传接口
     *
     * @param file 上传的文件
     * @return 访问地址
     * @throws Exception
     */
    public UploadFile uploadFile(MultipartFile file, String tableName) throws Exception;

    /**
     * 文件下载
     *
     * @param url 上传文件返回的url
     */
    public void downloadFile(HttpServletResponse response, String url);

}
